/*
 * QFontManager.h
 *
 *  Created on: 2009-9-9
 *      Author: rockling
 */

#ifndef QFONTMANAGER_H_
#define QFONTMANAGER_H_

//#include "QOsDefine.h"
#include "cx_typedef.h"
#include "QList.h"
#include "QFont.h"

struct CachedFont
{
	QVOID* m_spec;
	CQFont* m_pFont;
	CachedFont(CQFont* pFont,QVOID* spec):m_pFont(pFont),m_spec(spec){}
};

typedef CQList<CachedFont, CachedFont> FontCache;

class CQFontManager
	{
public:
	CQFontManager();
	virtual ~CQFontManager();
	//
	IMPORT_C static CQFont* GetFont(QVOID* aSpec);	
	IMPORT_C static CQFont* GetBoldFont(QINT height);
	IMPORT_C static CQFont* GetFont(QINT height);
	IMPORT_C static CQFont* GetFont(QINT height,QINT aGlyphBitmap);
	IMPORT_C static QINT32 GetHeightInTwips(QINT height);
	
private:
	//static CQFontManager* GetInstance();
	
	//CQFont* GetFromCache(TFontSpec spec);
	
	//QVOID CacheFont(CQFont* pFont, TFontSpec spec);
	
private:
	//FontCache iFontCache;
	};

#endif /* QFONTMANAGER_H_ */
